package krow.dev.gunpobus.view;

import krow.dev.gunpobus.R;
import krow.dev.gunpobus.util.AnimationUtil;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

public class LoadViewWrapper {

	private View mRootView;

	public LoadViewWrapper(Context context) {

		LayoutInflater layoutInflater = LayoutInflater.from(context);
		
		mRootView = layoutInflater.inflate(R.layout.view_load, null);

		View innerView = mRootView.findViewById(R.id.view_progress_inner);
		innerView.startAnimation(AnimationUtil.createRotateAnimation(context, 720, 0));
		
		View outerView = mRootView.findViewById(R.id.view_progress_outer);
		outerView.startAnimation(AnimationUtil.createRotateAnimation(context, 0, 1080));
	}
	
	public View getView(){
		
		return mRootView;
	}
	
	public void setVisibility(int visibility){
		
		mRootView.setVisibility(visibility);
	}
}
